package turtle.system.invest.evaluate;

import org.osite.xml.XmlConstructor;
import org.osite.xml.XmlParam;

import turtle.system.invest.Environment;
import turtle.system.invest.rule.InvestRunnable;

public class SetVariable implements InvestRunnable {
	
	private String name;
	private String value;

	@XmlConstructor
	public SetVariable(
			@XmlParam("name") String name, 
			@XmlParam("value") String value) {
		this.name = name;
		this.value = value;
	}
	
	@Override
	public void run(Environment environment) {
		environment.set(name, value);
	}
}
